load("@rules_cc//cc:defs.bzl", "cc_binary")
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_python//python:defs.bzl", "py_binary")

package(default_visibility = ["//benchmarks:__subpackages__"])

cc_binary(
    name = "protoc-gen-proto2_to_proto3",
    srcs = [
        "schema_proto2_to_proto3_util.h",
        "protoc-gen-proto2_to_proto3.cc",
    ],
    deps = [
        "//:protobuf",
        "//src/google/protobuf/compiler:code_generator",
        "//benchmarks:benchmarks_cc_proto",
    ],
    visibility = ["//benchmarks:__subpackages__"],
)

cc_binary(
    name = "proto3_data_stripper",
    srcs = [
        "data_proto2_to_proto3_util.h",
        "proto3_data_stripper.cc",
    ],
    deps = [
        "//:protobuf",
        "//benchmarks/datasets:cc_protos",
        "//benchmarks:benchmarks_cc_proto",
    ],
)

py_binary(
    name = "result_parser",
    srcs = ["result_parser.py"],
    deps = [
        "//benchmarks:benchmarks_py_proto",
    ],
)

################################################################################
# Distribution files
################################################################################

pkg_files(
    name = "dist_files",
    srcs = glob(["*"]),
    strip_prefix = strip_prefix.from_root(""),
)
